package com.hmall.user.config;

import com.hmall.user.util.UserHolder;
import feign.RequestInterceptor;
import org.springframework.stereotype.Service;

/**
 * @author Ms SUN
 * @date 2023/5/14
 */
@Service
public class MyFeignInterceptor  implements RequestInterceptor {
    @Override
    public void apply(feign.RequestTemplate requestTemplate) {
        requestTemplate.header("authorization",String.valueOf(UserHolder.getUser()));
    }
}
